<?php

class StdModeHandler implements ModeHandler
{
	public function handleResult ($result, CliContext $context)
	{
		$result = CliLib::numberOf($result, $context);
		return round($result, $context->getSetting('result_round'));
	}

	public function getInt ($number)
	{
		return (int) $number;
	}

	public function getFloat ($number)
	{
		return (float) $number;
	}

	public function getModeNumber ($number)
	{
		throw new CliModeException(
			"Std mode does not implement the ModeNumber type");
	}
}

?>